From 1f2b7910d7953fdb5ec52d334c1146413af26737 Mon Sep 17 00:00:00 2001 From: "emellor@leeni.uk.xensource.com" Date: Tue, 29 Nov 2005 14:57:33 +0000 Subject: [PATCH] Support facilities for the new DHCP support. Signed-off-by: Ewan Mellor --- tools/examples/xen-network-common.sh | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/tools/examples/xen-network-common.sh b/tools/examples/xen-network-common.sh index c2fc311fac..922d3a3dc8 100644 --- a/tools/examples/xen-network-common.sh +++ b/tools/examples/xen-network-common.sh @@ -69,3 +69,29 @@ else true } fi + + +first_file() +{ + t="$1" + shift + for file in $@ + do + if [ "$t" "$file" ] + then + echo "$file" + return + fi + done +} + +find_dhcpd_conf_file() +{ + first_file -f /etc/dhcp3/dhcpd.conf /etc/dhcpd.conf +} + + +find_dhcpd_init_file() +{ + first_file -x /etc/init.d/dhcp3-server /etc/init.d/dhcp +} -- 2.30.2